package io;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Test2 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("E:\\itheima\\a.txt");
        //只能弄文件的路径，不能弄文件夹的路径
        FileOutputStream fos = new FileOutputStream("E:\\heima\\b.txt");

        byte [] bytes = new byte[1024];
        int len ;
        while ((len = fis.read(bytes))!=-1){
            fos.write(bytes,0,len);
        }
        fis.close();
        fos.close();
    }
}
